﻿using System;
using CuteSprite.Eme.UI.Utils;
using HmFramework.Components;

namespace CuteSprite.Eme.UI.BsdUserCenter
{
	public partial class FrmBsdCustomerAdmin : EmeCommonAdminForm
	{
		#region -- 构造 --

		/// <summary>默认构造函数</summary>
		public FrmBsdCustomerAdmin()
		{
			EntityDataSource = EntityHelper.ModelUserCenter;
			EntityDataTable = EntityHelper.UserCenterTableCustomer;

			InitForm();
		}

		#endregion

		#region -- method InitComponent --

		private ButtonItem _btiCustomReport;
		protected override void InitComponent()
		{
			base.InitComponent();

			var btnexport = ExportButton as ButtonX;
			if (btnexport != null)
			{
				_btiCustomReport = CreateButtonItem("btiAll", "定制报表", true);
				_btiCustomReport.Click += new EventHandler((sender, e) =>
				{
					var frmExport = new FrmExportCustomer();
					frmExport.ShowDialog(this);
				});
				btnexport.SubItems.AddRange(new BaseItem[] { _btiCustomReport });
			}
		}
		#endregion
	}
}
